<template>
  <div class="col-md-8">
    <h3 class="reply">评论回复：</h3>
    <h2 v-show="comments.length===0">暂无评论，点击左侧添加评论！！！</h2>
    <ul class="list-group">
      <item v-for="(comment,index) in comments" :key="index" :comment="comment" :deleteComment="deleteComment" :index="index" />
    </ul>
  </div>
</template>

<script>
  import Item from './Item.vue'

  export default {
    name: 'List',
    //声名接收属性:这个属性就会成为组件对象属性
    props:['comments','deleteComment'], //简单的写法
    components:{
      Item
    }
  }
</script>

<style>
  .reply {
    margin-top: 0px;
  }

</style>
